<ion-view>
    <ion-header-bar align-title="center" class="headbar bar-header bar-clear">
        <a nav-direction="back" nav-transition="ios" class="button icon ion-ios-arrow-left button-clear " ng-href="#/main/amap" target="_self"></a>
        <h1 class="title">订单</h1>
    </ion-header-bar>
    <ion-content has-header="true" scroll="true" scrollbar-y="false">
        <div class="contextv" ng-if="orders.length>
            0">
            <a class="item item-avatar item-icon-left item-icon-right" ng-repeat="order in orders" ng-click="pay(order)">
                <img src='/logo.jpg' />
                <h2>时间:{{order.acceptTime | displayTime}}</h2>
                <p ng-if="order.length >0" style="color:yellow;">里程:{{order.length}}</p>
                <p style="color:springgreen;">状态:{{order.state | orderStatus}}</p>
            </a>
        </div>
        <div class="ortaxt" ng-if="orders.length <= 0">
            <div class="orditem item item-body">
                <img class="order-image" src='norder.png' />
                <h2>暂无订单，快去下订单吧</h2>
            </div>
        </div>
        <div class="ortaxt" ng-hide="$root.currentUser || $root.loggingIn">
            <div class="orditem item item-body">
                <img class="order-image" src='norder.png' />
                <h2>暂无订单，快去下订单吧</h2>
            </div>
        </div>
        <button class="logining button button-calm button-block" ng-click="request()">立即下单</button>
    </ion-content>
</ion-view>
